﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WPFCABShell.$safeprojectname$.Services.StatusBar
{
	/// <summary>
	/// Contains event data related to progress change.
	/// </summary>
	public sealed class ProgressEventArgs : StatusEventArgs
	{
		private readonly bool _isIndeterminate;
		private readonly double _minimum;
		private readonly double _maximum;
		private readonly double _value;

		/// <summary>
		/// An empty instance of <c>ProgressEventArgs</c>.
		/// </summary>
		public static readonly new ProgressEventArgs Empty = new ProgressEventArgs(null, false, 0, 0, 0);

		/// <summary>
		/// Gets a value indicating whether this <c>ProgressEventArgs</c> is empty.
		/// </summary>
		public bool IsEmpty
		{
			get
			{
				return (Text == null) && !IsIndeterminate && (Minimum == 0D) && (Maximum == 0D) && (Value == 0D);
			}
		}

		/// <summary>
		/// Gets a value indicating whether the progress operation is indeterminate in length.
		/// </summary>
		public bool IsIndeterminate
		{
			get
			{
				return _isIndeterminate;
			}
		}

		/// <summary>
		/// Gets the minimum value for the progress operation.
		/// </summary>
		public double Minimum
		{
			get
			{
				return _minimum;
			}
		}

		/// <summary>
		/// Gets the maximum value for the progress operation.
		/// </summary>
		public double Maximum
		{
			get
			{
				return _maximum;
			}
		}

		/// <summary>
		/// Gets the current value for the progress operation.
		/// </summary>
		public double Value
		{
			get
			{
				return _value;
			}
		}

		public ProgressEventArgs(string text, bool isIndeterminate, double minimum, double maximum, double value)
			: base(text)
		{
			_isIndeterminate = isIndeterminate;
			_minimum = minimum;
			_maximum = maximum;
			_value = value;
		}
	}
}
